<!DOCTYPE html>
<html>
<head>
  	<title>进销存管理系统</title>
  	<#import "/common/common.macro.ftl" as netCommon>
	<@netCommon.commonStyle />
	<!-- DataTables -->
  	<link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.css">

	<#-- select2
    <link rel="stylesheet" href="${request.contextPath}/static/adminlte/plugins/select2/select2.min.css">
    <script src="${request.contextPath}/static/adminlte/plugins/select2/select2.min.js"></script>
    //$(".select2").select2();
    -->
	<style>
		.show-calendar{
		z-index:99999999;
		}
	</style>
</head>
<body class="hold-transition skin-blue sidebar-mini <#if cookieMap?exists && "off" == cookieMap["adminlte_settings"].value >sidebar-collapse</#if>">
<div class="wrapper">
	<!-- header -->
	<@netCommon.commonHeader />
	<!-- left -->
	<@netCommon.commonLeft "account" />
	
	<!-- Content Wrapper. Contains page content -->
	<div class="content-wrapper">
		<!-- Content Header (Page header) -->
		<section class="content-header">
			<h1>账户管理</h1>
		</section>
		
		<!-- Main content -->
	    <section class="content">
	    
	    	<div class="row">
	    		<div class="col-xs-4">
	              	<div class="input-group">
	                	<span class="input-group-addon">账户名</span>
                		<input type="text" class="form-control" id="accountName" autocomplete="on" name="accountName">
	              	</div>
	            </div>
                <div class="col-xs-4">
                    <div class="input-group">
                        <span class="input-group-addon">商户名</span>
                        <input type="text" class="form-control" id="companyName" autocomplete="on" name="companyName">
                    </div>
                </div>
	            <div class="col-xs-2">
	            	<button class="btn btn-block btn-info" id="searchBtn">搜索</button>
	            </div>
	            <div class="col-xs-2">
	            	<button class="btn btn-block btn-success add" type="button">+新增账户</button>
	            </div>
          	</div>
	    	
			<div class="row">
				<div class="col-xs-12">
					<div class="box">
			            <div class="box-body" >
			              	<table id="account_list" class="table table-bordered table-striped">
				                <thead>
					            	<tr>
					            		<th name="id" >id</th>
					                	<th name="companyId" >companyId</th>
                                        <th name="accountName" >账户名</th>
                                        <th name="userName" >用户名</th>
					                  	<th name="createDate" >创建时间</th>
                                        <th name="freezeDate" >到期时间</th>
					                  	<th name="lastLoginTime" >最后登录时间</th>
                                        <th name="lastLoginip" >最后登录地址</th>
					                  	<th name="loginCount" >登录次数</th>
					                  	<th name="companyName" >所属商户</th>
					                  	<th>操作</th>
					                </tr>
				                </thead>
				                <tbody></tbody>
				                <tfoot></tfoot>
							</table>
						</div>
					</div>
				</div>
			</div>
	    </section>
	</div>
	
	<!-- footer -->
	<@netCommon.commonFooter />
</div>

<!-- account新增.模态框 -->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
            	<h4 class="modal-title" >新增账户</h4>
         	</div>
         	<div class="modal-body">
				<form class="form-horizontal form" role="form" >
					<div class="form-group">
						<label for="username" class="col-sm-2 control-label">账户名<font color="red">*</font></label>
						<div class="col-sm-4"><input type="text" class="form-control" name="nickname" placeholder="请输入账户名" maxlength="50"></div>
						<label for="username" class="col-sm-2 control-label">账户到期时间<font color="red">*</font></label>
						<div class="col-sm-4"><input type="text" class="form-control" name="freezetime" id="filterTime" readonly></div>
					</div>
					<div class="form-group">
						<label for="username" class="col-sm-2 control-label">用户名<font color="red">*</font></label>
						<div class="col-sm-4"><input type="text" class="form-control" name="username" placeholder="请输入用户名" maxlength="50" ></div>
						<label for="firstname" class="col-sm-2 control-label">所属商户<font color="red">*</font></label>
						<div class="col-sm-4">
							<select class="form-control" name="company" >
		            			<#list companyList as company>
		            				<option value="${company.tc_id}" >${company.tc_name}</option>
		            			</#list>
		                  	</select>
						</div>
					</div>
					<div class="form-group">
						<label for="username" class="col-sm-2 control-label">密码<font color="red">*</font></label>
						<div class="col-sm-4"><input type="text" class="form-control" name="password1" placeholder="请输入密码" maxlength="50" id="password1"></div>
                        <label for="lastname" class="col-sm-2 control-label">再次输入密码<font color="red">*</font></label>
                        <div class="col-sm-4"><input type="text" class="form-control" name="password2" placeholder="再次输入密码" maxlength="50" ></div>
					</div>

                    <hr>
					<div class="form-group">
						<div class="col-sm-offset-5 col-sm-6">
							<button type="submit" class="btn btn-primary"  >保存</button>
							<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
						</div>
					</div>
				</form>
         	</div>
		</div>
	</div>
</div>

<!-- 更新.模态框 -->
<div class="modal fade" id="updateModal" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog modal-lg">
		<div class="modal-content">
			<div class="modal-header">
            	<h4 class="modal-title" >更新账户</h4>
         	</div>
         	<div class="modal-body">
				<form class="form-horizontal form" role="form" >
                    <div class="form-group">
						<label for="username" class="col-sm-2 control-label">账户名<font color="red">*</font></label>
						<div class="col-sm-4"><input type="text" class="form-control" name="nickname" placeholder="请输入账户名" maxlength="50"></div>
						<label for="username" class="col-sm-2 control-label">账户到期时间<font color="red">*</font></label>
						<div class="col-sm-4"><input type="text" class="form-control" name="freezetime" id="filterTime1" readonly></div>
					</div>
					<div class="form-group">
						<label for="firstname" class="col-sm-2 control-label">所属商户<font color="red">*</font></label>
						<div class="col-sm-4">
							<select class="form-control" name="company" >
		            			<#list companyList as company>
		            				<option value="${company.tc_id}" >${company.tc_name}</option>
		            			</#list>
		                  	</select>
						</div>
					</div>
					<hr>
					<div class="form-group">
                        <div class="col-sm-offset-5 col-sm-6">
							<button type="submit" class="btn btn-primary"  >保存</button>
							<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <input type="hidden" name="id" >
						</div>
					</div>
				</form>
         	</div>
		</div>
	</div>
</div>

<!-- 修改密码.模态框 -->
<div class="modal fade" id="updatePasswordModal" tabindex="-1" role="dialog"  aria-hidden="true">
	<div class="modal-dialog modal-sm">
		<div class="modal-content">
			<div class="modal-header">
            	<h4 class="modal-title" >修改密码</h4>
         	</div>
         	<div class="modal-body">
				<form class="form-horizontal form" role="form" >
                    <div class="form-group">
						<label for="username" class="col-sm-4 control-label">旧密码<font color="red">*</font></label>
						<div class="col-sm-8"><input type="text" class="form-control" name="oldPassword" placeholder="请输入旧密码" maxlength="50"></div>
					</div>
                    <div class="form-group">
						<label for="username" class="col-sm-4 control-label">新密码<font color="red">*</font></label>
						<div class="col-sm-8"><input type="text" class="form-control" name="newPassword" id="newPassword" placeholder="请输入新密码" maxlength="50"></div>
					</div>
                    <div class="form-group">
						<label for="username" class="col-sm-4 control-label">再次输入密码<font color="red">*</font></label>
						<div class="col-sm-8"><input type="text" class="form-control" name="newPassword1" placeholder="请再次输入密码" maxlength="50"></div>
					</div>
					<hr>
					<div class="form-group">
                        <div class="col-sm-offset-3 col-sm-6">
							<button type="submit" class="btn btn-primary"  >保存</button>
							<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
                            <input type="hidden" name="id" >
						</div>
					</div>
				</form>
         	</div>
		</div>
	</div>
</div>

<@netCommon.commonScript />
<!-- DataTables -->
<script src="${request.contextPath}/static/adminlte/plugins/datatables/jquery.dataTables.min.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/datatables/dataTables.bootstrap.min.js"></script>
<script src="${request.contextPath}/static/plugins/jquery/jquery.validate.min.js"></script>
<!-- daterangepicker -->
<script src="${request.contextPath}/static/adminlte/plugins/daterangepicker/moment.min.js"></script>
<script src="${request.contextPath}/static/adminlte/plugins/daterangepicker/daterangepicker.js"></script>
<script src="${request.contextPath}/static/js/account.index.1.js"></script>
</body>
</html>
